(0) Obligation:

Clauses:

log2(X, Y) :- log2(X, 0, Y).
log2(0, I, I).
log2(s(0), I, I).
log2(s(s(X)), I, Y) :- ','(half(s(s(X)), X1), log2(X1, s(I), Y)).
half(0, 0).
half(s(0), 0).
half(s(s(X)), s(Y)) :- half(X, Y).

Query: log2(g,a)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

halfA(s(s(X1)), s(X2)) :- halfA(X1, X2).
halfB(X1, s(X2)) :- halfA(X1, X2).
pC(X1, X2, X3, X4) :- halfB(X1, X2).
pC(X1, s(s(X2)), X3, X4) :- ','(halfcB(X1, s(s(X2))), pC(X2, X5, s(X3), X4)).
log2D(s(s(X1)), X2) :- halfB(X1, X3).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), halfB(X3, X4)).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), halfB(X4, X5))).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), ','(halfcB(X4, s(s(X5))), halfB(X5, X6)))).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), ','(halfcB(X4, s(s(X5))), ','(halfcB(X5, s(s(X6))), halfB(X6, X7))))).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), ','(halfcB(X4, s(s(X5))), ','(halfcB(X5, s(s(X6))), ','(halfcB(X6, s(s(X7))), halfB(X7, X8)))))).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), ','(halfcB(X4, s(s(X5))), ','(halfcB(X5, s(s(X6))), ','(halfcB(X6, s(s(X7))), ','(halfcB(X7, s(s(X8))), halfB(X8, X9))))))).
log2D(s(s(X1)), X2) :- ','(halfcB(X1, s(s(X3))), ','(halfcB(X3, s(s(X4))), ','(halfcB(X4, s(s(X5))), ','(halfcB(X5, s(s(X6))), ','(halfcB(X6, s(s(X7))), ','(halfcB(X7, s(s(X8))), ','(halfcB(X8, s(s(X9))), pC(X9, X10, s(s(s(s(s(s(s(0))))))), X2)))))))).

Clauses:

halfcA(0, 0).
halfcA(s(0), 0).
halfcA(s(s(X1)), s(X2)) :- halfcA(X1, X2).
halfcB(X1, s(X2)) :- halfcA(X1, X2).
qcC(X1, 0, X2, s(X2)) :- halfcB(X1, 0).
qcC(X1, s(0), X2, s(X2)) :- halfcB(X1, s(0)).
qcC(X1, s(s(X2)), X3, X4) :- ','(halfcB(X1, s(s(X2))), qcC(X2, X5, s(X3), X4)).

Afs:

log2D(x1, x2)  =  log2D(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
log2D_in: (b,f)
halfB_in: (b,f)
halfA_in: (b,f)
halfcB_in: (b,f)
halfcA_in: (b,f)
pC_in: (b,f,b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

LOG2D_IN_GA(s(s(X1)), X2) → U6_GA(X1, X2, halfB_in_ga(X1, X3))
LOG2D_IN_GA(s(s(X1)), X2) → HALFB_IN_GA(X1, X3)
HALFB_IN_GA(X1, s(X2)) → U2_GA(X1, X2, halfA_in_ga(X1, X2))
HALFB_IN_GA(X1, s(X2)) → HALFA_IN_GA(X1, X2)
HALFA_IN_GA(s(s(X1)), s(X2)) → U1_GA(X1, X2, halfA_in_ga(X1, X2))
HALFA_IN_GA(s(s(X1)), s(X2)) → HALFA_IN_GA(X1, X2)
LOG2D_IN_GA(s(s(X1)), X2) → U7_GA(X1, X2, halfcB_in_ga(X1, s(s(X3))))
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → U8_GA(X1, X2, halfB_in_ga(X3, X4))
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → HALFB_IN_GA(X3, X4)
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → U9_GA(X1, X2, halfcB_in_ga(X3, s(s(X4))))
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → U10_GA(X1, X2, halfB_in_ga(X4, X5))
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → HALFB_IN_GA(X4, X5)
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → U11_GA(X1, X2, halfcB_in_ga(X4, s(s(X5))))
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → U12_GA(X1, X2, halfB_in_ga(X5, X6))
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → HALFB_IN_GA(X5, X6)
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → U13_GA(X1, X2, halfcB_in_ga(X5, s(s(X6))))
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → U14_GA(X1, X2, halfB_in_ga(X6, X7))
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → HALFB_IN_GA(X6, X7)
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → U15_GA(X1, X2, halfcB_in_ga(X6, s(s(X7))))
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → U16_GA(X1, X2, halfB_in_ga(X7, X8))
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → HALFB_IN_GA(X7, X8)
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → U17_GA(X1, X2, halfcB_in_ga(X7, s(s(X8))))
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → U18_GA(X1, X2, halfB_in_ga(X8, X9))
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → HALFB_IN_GA(X8, X9)
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → U19_GA(X1, X2, halfcB_in_ga(X8, s(s(X9))))
U19_GA(X1, X2, halfcB_out_ga(X8, s(s(X9)))) → U20_GA(X1, X2, pC_in_gaga(X9, X10, s(s(s(s(s(s(s(0))))))), X2))
U19_GA(X1, X2, halfcB_out_ga(X8, s(s(X9)))) → PC_IN_GAGA(X9, X10, s(s(s(s(s(s(s(0))))))), X2)
PC_IN_GAGA(X1, X2, X3, X4) → U3_GAGA(X1, X2, X3, X4, halfB_in_ga(X1, X2))
PC_IN_GAGA(X1, X2, X3, X4) → HALFB_IN_GA(X1, X2)
PC_IN_GAGA(X1, s(s(X2)), X3, X4) → U4_GAGA(X1, X2, X3, X4, halfcB_in_ga(X1, s(s(X2))))
U4_GAGA(X1, X2, X3, X4, halfcB_out_ga(X1, s(s(X2)))) → U5_GAGA(X1, X2, X3, X4, pC_in_gaga(X2, X5, s(X3), X4))
U4_GAGA(X1, X2, X3, X4, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, X5, s(X3), X4)

The TRS R consists of the following rules:

halfcB_in_ga(X1, s(X2)) → U23_ga(X1, X2, halfcA_in_ga(X1, X2))
halfcA_in_ga(0, 0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0), 0) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1)), s(X2)) → U22_ga(X1, X2, halfcA_in_ga(X1, X2))
U22_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfB_in_ga(x1, x2)  =  halfB_in_ga(x1)
halfA_in_ga(x1, x2)  =  halfA_in_ga(x1)
halfcB_in_ga(x1, x2)  =  halfcB_in_ga(x1)
U23_ga(x1, x2, x3)  =  U23_ga(x1, x3)
halfcA_in_ga(x1, x2)  =  halfcA_in_ga(x1)
0  =  0
halfcA_out_ga(x1, x2)  =  halfcA_out_ga(x1, x2)
U22_ga(x1, x2, x3)  =  U22_ga(x1, x3)
halfcB_out_ga(x1, x2)  =  halfcB_out_ga(x1, x2)
pC_in_gaga(x1, x2, x3, x4)  =  pC_in_gaga(x1, x3)
LOG2D_IN_GA(x1, x2)  =  LOG2D_IN_GA(x1)
U6_GA(x1, x2, x3)  =  U6_GA(x1, x3)
HALFB_IN_GA(x1, x2)  =  HALFB_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HALFA_IN_GA(x1, x2)  =  HALFA_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U7_GA(x1, x2, x3)  =  U7_GA(x1, x3)
U8_GA(x1, x2, x3)  =  U8_GA(x1, x3)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
U10_GA(x1, x2, x3)  =  U10_GA(x1, x3)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U12_GA(x1, x2, x3)  =  U12_GA(x1, x3)
U13_GA(x1, x2, x3)  =  U13_GA(x1, x3)
U14_GA(x1, x2, x3)  =  U14_GA(x1, x3)
U15_GA(x1, x2, x3)  =  U15_GA(x1, x3)
U16_GA(x1, x2, x3)  =  U16_GA(x1, x3)
U17_GA(x1, x2, x3)  =  U17_GA(x1, x3)
U18_GA(x1, x2, x3)  =  U18_GA(x1, x3)
U19_GA(x1, x2, x3)  =  U19_GA(x1, x3)
U20_GA(x1, x2, x3)  =  U20_GA(x1, x3)
PC_IN_GAGA(x1, x2, x3, x4)  =  PC_IN_GAGA(x1, x3)
U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)
U5_GAGA(x1, x2, x3, x4, x5)  =  U5_GAGA(x1, x2, x3, x5)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LOG2D_IN_GA(s(s(X1)), X2) → U6_GA(X1, X2, halfB_in_ga(X1, X3))
LOG2D_IN_GA(s(s(X1)), X2) → HALFB_IN_GA(X1, X3)
HALFB_IN_GA(X1, s(X2)) → U2_GA(X1, X2, halfA_in_ga(X1, X2))
HALFB_IN_GA(X1, s(X2)) → HALFA_IN_GA(X1, X2)
HALFA_IN_GA(s(s(X1)), s(X2)) → U1_GA(X1, X2, halfA_in_ga(X1, X2))
HALFA_IN_GA(s(s(X1)), s(X2)) → HALFA_IN_GA(X1, X2)
LOG2D_IN_GA(s(s(X1)), X2) → U7_GA(X1, X2, halfcB_in_ga(X1, s(s(X3))))
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → U8_GA(X1, X2, halfB_in_ga(X3, X4))
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → HALFB_IN_GA(X3, X4)
U7_GA(X1, X2, halfcB_out_ga(X1, s(s(X3)))) → U9_GA(X1, X2, halfcB_in_ga(X3, s(s(X4))))
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → U10_GA(X1, X2, halfB_in_ga(X4, X5))
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → HALFB_IN_GA(X4, X5)
U9_GA(X1, X2, halfcB_out_ga(X3, s(s(X4)))) → U11_GA(X1, X2, halfcB_in_ga(X4, s(s(X5))))
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → U12_GA(X1, X2, halfB_in_ga(X5, X6))
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → HALFB_IN_GA(X5, X6)
U11_GA(X1, X2, halfcB_out_ga(X4, s(s(X5)))) → U13_GA(X1, X2, halfcB_in_ga(X5, s(s(X6))))
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → U14_GA(X1, X2, halfB_in_ga(X6, X7))
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → HALFB_IN_GA(X6, X7)
U13_GA(X1, X2, halfcB_out_ga(X5, s(s(X6)))) → U15_GA(X1, X2, halfcB_in_ga(X6, s(s(X7))))
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → U16_GA(X1, X2, halfB_in_ga(X7, X8))
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → HALFB_IN_GA(X7, X8)
U15_GA(X1, X2, halfcB_out_ga(X6, s(s(X7)))) → U17_GA(X1, X2, halfcB_in_ga(X7, s(s(X8))))
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → U18_GA(X1, X2, halfB_in_ga(X8, X9))
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → HALFB_IN_GA(X8, X9)
U17_GA(X1, X2, halfcB_out_ga(X7, s(s(X8)))) → U19_GA(X1, X2, halfcB_in_ga(X8, s(s(X9))))
U19_GA(X1, X2, halfcB_out_ga(X8, s(s(X9)))) → U20_GA(X1, X2, pC_in_gaga(X9, X10, s(s(s(s(s(s(s(0))))))), X2))
U19_GA(X1, X2, halfcB_out_ga(X8, s(s(X9)))) → PC_IN_GAGA(X9, X10, s(s(s(s(s(s(s(0))))))), X2)
PC_IN_GAGA(X1, X2, X3, X4) → U3_GAGA(X1, X2, X3, X4, halfB_in_ga(X1, X2))
PC_IN_GAGA(X1, X2, X3, X4) → HALFB_IN_GA(X1, X2)
PC_IN_GAGA(X1, s(s(X2)), X3, X4) → U4_GAGA(X1, X2, X3, X4, halfcB_in_ga(X1, s(s(X2))))
U4_GAGA(X1, X2, X3, X4, halfcB_out_ga(X1, s(s(X2)))) → U5_GAGA(X1, X2, X3, X4, pC_in_gaga(X2, X5, s(X3), X4))
U4_GAGA(X1, X2, X3, X4, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, X5, s(X3), X4)

The TRS R consists of the following rules:

halfcB_in_ga(X1, s(X2)) → U23_ga(X1, X2, halfcA_in_ga(X1, X2))
halfcA_in_ga(0, 0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0), 0) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1)), s(X2)) → U22_ga(X1, X2, halfcA_in_ga(X1, X2))
U22_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfB_in_ga(x1, x2)  =  halfB_in_ga(x1)
halfA_in_ga(x1, x2)  =  halfA_in_ga(x1)
halfcB_in_ga(x1, x2)  =  halfcB_in_ga(x1)
U23_ga(x1, x2, x3)  =  U23_ga(x1, x3)
halfcA_in_ga(x1, x2)  =  halfcA_in_ga(x1)
0  =  0
halfcA_out_ga(x1, x2)  =  halfcA_out_ga(x1, x2)
U22_ga(x1, x2, x3)  =  U22_ga(x1, x3)
halfcB_out_ga(x1, x2)  =  halfcB_out_ga(x1, x2)
pC_in_gaga(x1, x2, x3, x4)  =  pC_in_gaga(x1, x3)
LOG2D_IN_GA(x1, x2)  =  LOG2D_IN_GA(x1)
U6_GA(x1, x2, x3)  =  U6_GA(x1, x3)
HALFB_IN_GA(x1, x2)  =  HALFB_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HALFA_IN_GA(x1, x2)  =  HALFA_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U7_GA(x1, x2, x3)  =  U7_GA(x1, x3)
U8_GA(x1, x2, x3)  =  U8_GA(x1, x3)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
U10_GA(x1, x2, x3)  =  U10_GA(x1, x3)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U12_GA(x1, x2, x3)  =  U12_GA(x1, x3)
U13_GA(x1, x2, x3)  =  U13_GA(x1, x3)
U14_GA(x1, x2, x3)  =  U14_GA(x1, x3)
U15_GA(x1, x2, x3)  =  U15_GA(x1, x3)
U16_GA(x1, x2, x3)  =  U16_GA(x1, x3)
U17_GA(x1, x2, x3)  =  U17_GA(x1, x3)
U18_GA(x1, x2, x3)  =  U18_GA(x1, x3)
U19_GA(x1, x2, x3)  =  U19_GA(x1, x3)
U20_GA(x1, x2, x3)  =  U20_GA(x1, x3)
PC_IN_GAGA(x1, x2, x3, x4)  =  PC_IN_GAGA(x1, x3)
U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)
U5_GAGA(x1, x2, x3, x4, x5)  =  U5_GAGA(x1, x2, x3, x5)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 29 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

HALFA_IN_GA(s(s(X1)), s(X2)) → HALFA_IN_GA(X1, X2)

The TRS R consists of the following rules:

halfcB_in_ga(X1, s(X2)) → U23_ga(X1, X2, halfcA_in_ga(X1, X2))
halfcA_in_ga(0, 0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0), 0) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1)), s(X2)) → U22_ga(X1, X2, halfcA_in_ga(X1, X2))
U22_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfcB_in_ga(x1, x2)  =  halfcB_in_ga(x1)
U23_ga(x1, x2, x3)  =  U23_ga(x1, x3)
halfcA_in_ga(x1, x2)  =  halfcA_in_ga(x1)
0  =  0
halfcA_out_ga(x1, x2)  =  halfcA_out_ga(x1, x2)
U22_ga(x1, x2, x3)  =  U22_ga(x1, x3)
halfcB_out_ga(x1, x2)  =  halfcB_out_ga(x1, x2)
HALFA_IN_GA(x1, x2)  =  HALFA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

HALFA_IN_GA(s(s(X1)), s(X2)) → HALFA_IN_GA(X1, X2)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
HALFA_IN_GA(x1, x2)  =  HALFA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HALFA_IN_GA(s(s(X1))) → HALFA_IN_GA(X1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • HALFA_IN_GA(s(s(X1))) → HALFA_IN_GA(X1)
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PC_IN_GAGA(X1, s(s(X2)), X3, X4) → U4_GAGA(X1, X2, X3, X4, halfcB_in_ga(X1, s(s(X2))))
U4_GAGA(X1, X2, X3, X4, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, X5, s(X3), X4)

The TRS R consists of the following rules:

halfcB_in_ga(X1, s(X2)) → U23_ga(X1, X2, halfcA_in_ga(X1, X2))
halfcA_in_ga(0, 0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0), 0) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1)), s(X2)) → U22_ga(X1, X2, halfcA_in_ga(X1, X2))
U22_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, X2, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfcB_in_ga(x1, x2)  =  halfcB_in_ga(x1)
U23_ga(x1, x2, x3)  =  U23_ga(x1, x3)
halfcA_in_ga(x1, x2)  =  halfcA_in_ga(x1)
0  =  0
halfcA_out_ga(x1, x2)  =  halfcA_out_ga(x1, x2)
U22_ga(x1, x2, x3)  =  U22_ga(x1, x3)
halfcB_out_ga(x1, x2)  =  halfcB_out_ga(x1, x2)
PC_IN_GAGA(x1, x2, x3, x4)  =  PC_IN_GAGA(x1, x3)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)

We have to consider all (P,R,Pi)-chains

(15) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, halfcB_in_ga(X1))
U4_GAGA(X1, X3, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, s(X3))

The TRS R consists of the following rules:

halfcB_in_ga(X1) → U23_ga(X1, halfcA_in_ga(X1))
halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The set Q consists of the following terms:

halfcB_in_ga(x0)
halfcA_in_ga(x0)
U22_ga(x0, x1)
U23_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(17) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, halfcB_in_ga(X1)) at position [2] we obtained the following new rules [LPAR04]:

PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, U23_ga(X1, halfcA_in_ga(X1)))

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U4_GAGA(X1, X3, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, s(X3))
PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, U23_ga(X1, halfcA_in_ga(X1)))

The TRS R consists of the following rules:

halfcB_in_ga(X1) → U23_ga(X1, halfcA_in_ga(X1))
halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))

The set Q consists of the following terms:

halfcB_in_ga(x0)
halfcA_in_ga(x0)
U22_ga(x0, x1)
U23_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(19) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U4_GAGA(X1, X3, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, s(X3))
PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, U23_ga(X1, halfcA_in_ga(X1)))

The TRS R consists of the following rules:

halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))

The set Q consists of the following terms:

halfcB_in_ga(x0)
halfcA_in_ga(x0)
U22_ga(x0, x1)
U23_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(21) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

halfcB_in_ga(x0)

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U4_GAGA(X1, X3, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, s(X3))
PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, U23_ga(X1, halfcA_in_ga(X1)))

The TRS R consists of the following rules:

halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))

The set Q consists of the following terms:

halfcA_in_ga(x0)
U22_ga(x0, x1)
U23_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


U4_GAGA(X1, X3, halfcB_out_ga(X1, s(s(X2)))) → PC_IN_GAGA(X2, s(X3))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(PC_IN_GAGA(x1, x2)) = 1 + x1   
POL(U22_ga(x1, x2)) = 1 + x2   
POL(U23_ga(x1, x2)) = x2   
POL(U4_GAGA(x1, x2, x3)) = x3   
POL(halfcA_in_ga(x1)) = 1 + x1   
POL(halfcA_out_ga(x1, x2)) = 1 + x2   
POL(halfcB_out_ga(x1, x2)) = x2   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))

(24) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PC_IN_GAGA(X1, X3) → U4_GAGA(X1, X3, U23_ga(X1, halfcA_in_ga(X1)))

The TRS R consists of the following rules:

halfcA_in_ga(0) → halfcA_out_ga(0, 0)
halfcA_in_ga(s(0)) → halfcA_out_ga(s(0), 0)
halfcA_in_ga(s(s(X1))) → U22_ga(X1, halfcA_in_ga(X1))
U23_ga(X1, halfcA_out_ga(X1, X2)) → halfcB_out_ga(X1, s(X2))
U22_ga(X1, halfcA_out_ga(X1, X2)) → halfcA_out_ga(s(s(X1)), s(X2))

The set Q consists of the following terms:

halfcA_in_ga(x0)
U22_ga(x0, x1)
U23_ga(x0, x1)

We have to consider all (P,Q,R)-chains.

(25) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(26) TRUE